// external.cc
#include<iostream>
extern double warming;
using std::cout;
void update(double dt)
{
    extern double warming;
    warming += dt;
    cout<<"Updated global warming: "<<warming<<" degree\n";
}
void local()
{
    double warming = 0.8;
    cout<<"Local warming = "<<warming<<" degree.\n";
    cout<<"But global warming = "<<::warming; //::使用全局版本的warming
    cout<<" degree.\n";
}
